home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 7: Programming / CDAT7.iso / Share / Codigo / hh / rsource.exe / Hexen Source / SOUNDST.H < prev    next >
Encoding:
C/C++ Source or Header  |  1996-03-22  |  1.8 KB  |  82 lines

  1.  
  2. //**************************************************************************
  3. //**
  4. //** soundst.h : Heretic 2 : Raven Software, Corp.
  5. //**
  6. //** $RCSfile: soundst.h,v $
  7. //** $Revision: 1.13 $
  8. //** $Date: 95/10/12 18:01:27 $
  9. //** $Author: cjr $
  10. //**
  11. //**************************************************************************
  12.  
  13. #ifndef __SOUNDSTH__
  14. #define __SOUNDSTH__
  15.  
  16. typedef struct
  17. {
  18.     char name[8];
  19.     int p1;
  20. } musicinfo_t;
  21.  
  22. typedef struct sfxinfo_s
  23. {
  24.     char tagName[32];
  25.     char lumpname[12]; // Only need 9 bytes, but padded out to be dword aligned
  26.     //struct sfxinfo_s *link; // Make alias for another sound
  27.     int priority; // Higher priority takes precendence
  28.     int usefulness; // Determines when a sound should be cached out
  29.     void *snd_ptr;
  30.     int lumpnum;
  31.     int numchannels; // total number of channels a sound type may occupy
  32.     boolean    changePitch;
  33. } sfxinfo_t;
  34.  
  35. typedef struct
  36. {
  37.     mobj_t *mo;
  38.     int sound_id;
  39.     int handle;
  40.     int volume;
  41.     int pitch;
  42.     int priority;
  43. } channel_t;
  44.  
  45. typedef struct
  46. {
  47.     long id;
  48.     unsigned short priority;
  49.     char *name;
  50.     mobj_t *mo;
  51.     int distance;
  52. } ChanInfo_t;
  53.  
  54. typedef struct
  55. {
  56.     int channelCount;
  57.     int musicVolume;
  58.     int soundVolume;
  59.     ChanInfo_t chan[8];
  60. } SoundInfo_t;
  61.  
  62. extern int snd_MaxVolume;
  63. extern int snd_MusicVolume;
  64.  
  65. void S_Start(void);
  66. void S_StartSound(mobj_t *origin, int sound_id);
  67. int S_GetSoundID(char *name);
  68. void S_StartSoundAtVolume(mobj_t *origin, int sound_id, int volume);
  69. void S_StopSound(mobj_t *origin);
  70. void S_StopAllSound(void);
  71. void S_PauseSound(void);
  72. void S_ResumeSound(void);
  73. void S_UpdateSounds(mobj_t *listener);
  74. void S_StartSong(int song, boolean loop);
  75. void S_StartSongName(char *songLump, boolean loop);
  76. void S_Init(void);
  77. void S_GetChannelInfo(SoundInfo_t *s);
  78. void S_SetMusicVolume(void);
  79. boolean S_GetSoundPlayingInfo(mobj_t *mobj, int sound_id);
  80.  
  81. #endif
  82.